﻿<UserControl x:Class="CreateWit"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2006" 
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      mc:Ignorable="d">
    <UserControl.Resources>
        <Style x:Key="ErrorTextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="Foreground" Value="#FFEE1010" />
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="FontSize" Value="14"/>
            <Setter Property="FontFamily" Value="Calibri"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Background" Value="{x:Null}"/>
        </Style>
        <Style x:Key="WelcomeButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Foreground" Value="#FFFFFF" />
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="FontFamily" Value="Calibri"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="bd" CornerRadius="3,3,3,3" Padding="5,0,0,0">
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" Margin="5,1,0,1"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsKeyboardFocused" Value="true"/>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Cursor" Value="Hand"/>
                                <Setter Property="Background" TargetName="bd" Value="#FF29367B"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <StackPanel Height="209" Width="379">

        <!-- Header -->
        <Border Width="Auto" Padding="5,0,5,0" Opacity="0.8" x:Name="Header" Background="{DynamicResource WelcomeBackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,0" CornerRadius="5,5,0,0" HorizontalAlignment="Stretch" >
            <Grid>
                <Rectangle Fill="{DynamicResource WelcomeHeaderBg}" Height="69" Width="300" HorizontalAlignment="Center" />
                <TextBlock Padding="4,0,0,0" Text="Create Work Item" TextWrapping="Wrap" Foreground="{DynamicResource WelcomeHeaderFontColor}" FontSize="18" FontWeight="Bold" x:Name="HeaderTextBlock" d:LayoutOverrides="Height" HorizontalAlignment="Left" Margin="3.5,0,0,2" VerticalAlignment="Bottom"/>
            </Grid>
        </Border>

        <!-- Content -->
        <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1">
            <Grid Margin="0,0,0,0" x:Name="ContentGrid" Background="{DynamicResource InputBackgroundBrush}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Label Name="ServerConnectLabel" Content="Connect to {0}" HorizontalAlignment="Left" VerticalAlignment="Top"  Grid.Row="0" Margin="10,0,0,0" Foreground="#FFB5C8D8" Visibility="Hidden" />
                <Grid HorizontalAlignment="Stretch" x:Name="ServersStackPanel" Grid.Row="0" VerticalAlignment="Stretch" Margin="20,30,20,20">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="30*" />
                        <ColumnDefinition Width="70*" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Grid.Column="0" Grid.Row="0">Project</Label>
                    <ComboBox Grid.Column="1" Grid.Row="0" Width="Auto" Name="ux_ProjectSelect"></ComboBox>
                    <Label Grid.Column="0" Grid.Row="1">WIT</Label>
                    <ComboBox  Grid.Column="1" Grid.Row="1" Name="ux_WITSelect"></ComboBox>
                </Grid>
                <GridSplitter IsEnabled="False" HorizontalAlignment="Stretch" Grid.Row="1" VerticalAlignment="Bottom" Height="1" Background="#FF3D4976" Margin="2,0,2,0"/>
            </Grid>
        </Border>

        <!-- Footer -->
        <Border Background="{DynamicResource BackgroundBrush}" Height="35" x:Name="Footer" Opacity="0.8" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Margin="0,0,20,0" IsEnabled="True" IsDefault="True" Name="ux_OKButton">OK</Button>
                <Button IsCancel="True" Name="ux_CancelButton">Cancel</Button>
            </StackPanel>
        </Border>

    </StackPanel>
</UserControl>
